import sys
sys.path.append("../workflow4threeman")

from workflow.Configuration import DataBaseConfig
from workflow.TextPayLoad import TextPayLoad
from workflow.DataExtractor.es_extractor import ElasticSearchConfig,ElasticSearchDataExtractor
from workflow.TextAnalyzer.lda import LdaAnalyzerConfig,LdaAnalyzer

def main():
    ESC = ElasticSearchConfig()
    ESD = ElasticSearchDataExtractor(ESC)
    LDA_C = LdaAnalyzerConfig(algorithm="gensim")
    LDA_A = LdaAnalyzer(LDA_C)
    print(LDA_A.analyze(ESD.get_text()))

main()